package cn.com.agree.product.exception;

import cn.com.agree.product.enums.ResultEnum;

/**
 * Descriptions...
 *
 * @author sun.ys
 * @date 2020/11/15.
 */
public class ProductException   extends  RuntimeException {

    private  Integer code;
    
    public  ProductException (Integer code,String message){
        
        super(message);
        this.code = code;
    }
    
    
    public  ProductException(ResultEnum  resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

}
